/// FileName test_model
///
/// @Author lax
/// @Date 2024/6/4
///
/// @Description

class TestModel {
  TestModel({
    this.id,
    this.planDate,
    this.question,
    this.action,
    this.createDate,
    this.createUserName,
  });

  TestModel.fromJson(dynamic json) {
    id = json['Id'];
    planDate = json['PlanDate'];
    question = json['Question'];
    action = json['Action'];
    createDate = json['CreateDate'];
    createUserName = json['CreateUserName'];
    status = json['Status'];
    statusName = json['StatusString'];
  }

  String? id;
  String? planDate;
  String? question;
  String? action;

  String? createDate;
  String? createUserName;

  String? status;
  String? statusName;

  String? get statusDesc {
    return {
      '0': '保存',
      '1': '进行中',
      '2': '延迟',
      '3': '完成',
    }[status ?? ''];
  }

  String? corp;
  String? corpName;

  bool get enable {
    return status == null || status == '0';
  }

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['Id'] = id;
    map['PlanDate'] = planDate;
    map['Question'] = question;
    map['Action'] = action;
    map['CreateDate'] = createDate;
    map['CreateUserName'] = createUserName;
    map['Status'] = status;
    map['StatusString'] = statusName;
    return map;
  }
}
